package com.hddznet.uniplatform.sm.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.hddznet.uniplatform.sm.util.HdStringUtils;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value="自定义查询请求实体", description="自定义查询对象")
public class ConditionReq {
	
	@ApiModelProperty(value = "字段名")
	@JsonProperty(value = "Field")
	private String field;
	
	@ApiModelProperty(value = "操作符")
	@JsonProperty(value = "Operate")
	private String operate;
	
	@ApiModelProperty(value = "字段值")
	@JsonProperty(value = "Value")
	private String value;

	public String getField() {
		return field;
	}

	/**重写set方法， 驼峰下划线转换*/
	public void setField(String field) {
		this.field = HdStringUtils.camelToUnderline(field);
	}

	public String getOperate() {
		return operate;
	}

	public void setOperate(String operate) {
		this.operate = operate;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	@Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", field=").append(field);
        sb.append(", operate=").append(operate);
        sb.append(", value=").append(value);
        sb.append("]");
        return sb.toString();
    }
}
